<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.lang.*,java.util.Vector,java.util.StringTokenizer" %>
<%String userid="";%>
<%
	String JobID="";
	JobID=(request.getParameter("JobID")==null)? "" : request.getParameter("JobID");
	System.out.println("-->"+JobID);
%>
<HTML>
<head>
		<LINK href="styles.css" type="text/css" rel="stylesheet">
		<script LANGUAGE="Javascript" SRC="Images/calender.js"></script>
		<script LANGUAGE="Javascript" SRC="Images/validate.js"></script>
		<script LANGUAGE="Javascript" SRC="Images/AjaxCall.js"></script>
                <script LANGUAGE="Javascript" SRC="Images/date-picker.js"></script>   
<script LANGUAGE="Javascript" SRC="">
		function ChkMandatoryField(F,T){
			var val= F.value;
			if(val==""){alert(T+" is mandatory");return false;}
		}



	function ChkNumField(F,T){
			var val = F.value;
			if(isNaN(val)==true||val==""){alert("Please enter numbers for "+T);return false;}
		}



		function DoPassWordValidation()
			{
			  var frm = document.forms(0);
			  if(frm.password.value != frm.retypepassword.value)
			  {
				alert('The Password and verified password does not match');
				frm.password.value='';
				frm.retypepassword.value='';
				return false;
			  }
			  else
			  {
				return true;
			  }
			}
		function ChkEmailField(F,T){
			var val = F.value;
			var pattern = /^[a-zA-Z0-9\_\.]+\@[a-zA-Z\.]+\.([a-z]{2,4})$/;
			if(!(pattern.test(val)==true)){alert("Please enter valid email for "+T);return false;}
		}
		function validate()
		{		var frm = document.forms(0);
			    if(ChkMandatoryField(frm.userid,'User Id')==false) return false;
				var divObj = document.getElementById("nameid");
				var Msg = divObj.innerHTML;
				if(Msg.indexOf("not available")>-1){
					alert("User name not available. Please choose another");
					frm.userid.value="";
				}
				//not available
				if(ChkMandatoryField(frm.password,'password')==false) return false;
			    if(ChkMandatoryField(frm.retypepassword,'Re type password')==false) return false;
			    if(DoPassWordValidation()==false) return false;
				if(ChkMandatoryField(frm.FirstName,'First Name')==false) return false;
				
			    if(ChkMandatoryField(frm.LastName,'Last Name')==false) return false;
			    if(ChkMandatoryField(frm.Email,'Email')==false) return false;
			    if(ChkEmailField(frm.Email,'Email')==false) return false;
				if(ChkMandatoryField(frm.ContactNumber,'Contact Number')==false) return false;
if(ChkNumField(frm.ContactNumber,'Contact Number')==false) return false;
			    if(ChkMandatoryField(frm.CurrentLocation,'Current Location')==false) return false;
			    if(ChkMandatoryField(frm.Address,'Address')==false) return false;
			    if(ChkMandatoryField(frm.DateOfBirth,'Date Of Birth')==false) return false;
			    if(ChkMandatoryField(frm.Gender,'Gender')==false) return false;
			    if(ChkMandatoryField(frm.BasicQualification,'Basic Qualification')==false) return false;
			    if(ChkMandatoryField(frm.PercentageBQ,'Percentage in Graduation ')==false) return false;
				if(ChkNumField(frm.PercentageBQ,' Percentage in Graduation ')==false) return false;
				if(ChkNumField(frm.PercentageBQ,'Percentage in Graduation ')==false) return false;
			    if(ChkMandatoryField(frm.YearOfPassBQ,'Year Of Pass Graduation')==false) return false;
			    if(ChkMandatoryField(frm.UniversityBQ,' Graduation done at University  ')==false) return false;
			    if(ChkMandatoryField(frm.PostGraduation,'Post Graduation')==false) return false;
				if(ChkMandatoryField(frm.Percentage,'Percentage in PG')==false) return false;
if(ChkNumField(frm.Percentage,'Percentage in PG must be Numbers')==false) return false;

			    if(ChkMandatoryField(frm.YearOfPass,'Year Of Pass of PG')==false) return false;
			    if(ChkMandatoryField(frm.University,'PostGraduation done at University')==false) return false;


if(ChkMandatoryField(frm.Year,'Total Experience Years ')==false) return false;
if(ChkMandatoryField(frm.Months,'Total Experience Months ')==false) return false;
				

if(ChkNumField(frm.AnnualSalary,'Annual Salary ')==false) return false;



				if(ChkMandatoryField(frm.KeySkills,'Key Skills')==false) return false;
				if(ChkMandatoryField(frm.ResumeTitle,'Resume Title')==false) return false;
		
				if(ChkMandatoryField(frm.TextResume,'Text Resume')==false) return false;
						if(ChkMandatoryField(frm.ResumePath,'Resume Path')==false) return false;
		
		}
function fnCheckDetails(U)
		{
			var frm = document.forms(0);
			var userid = frm.userid.value;
			if (userid=='')
			{
				alert("Please provide User name to Proceed");
			}else
			{
				var URL = U+"?userid="+userid;
				fnEmpPopUp(URL,200,400);
			}
		}
function fnUpload()
	{
		var userid = document.forms(0).userid;
		fnEmpPopUp('UploadResume1.jsp?userid='+userid,80,400);
	}
function fnCallChkAvailability(U)
	{
		var userid = U.value;
		var divObj = document.getElementById("nameid");
		URL = "ChkUser.jsp?userid="+userid;
		ajaxFunction(URL,divObj);
	}
	</script>


<BODY  Class=Grad>

<%
int IAuth;
IAuth=(session.getAttribute("auth")==null) ? 10 :(Integer)session.getAttribute("auth");
if(IAuth==0){
%>
<P align=right><a href="EmployRegistration0.jsp" target="ResultFrame">
<img border="0" name="EmpReg" src="Images/EmployerRegistration0.jpg" width="140" height="28" onmouseover="document['EmpReg'].src='Images/EmployerRegistration1.jpg'" onmouseout="document['EmpReg'].src='Images/EmployerRegistration0.jpg'" ></a></P>
<%
	}
%>
<%
if(IAuth==0 ||IAuth==10){
%>
<h3 align=center>Job seeker Registration</h3>
<FORM NAME="RegUser" ACTION="Register1.jsp" OnSubmit="return validate()">
	<input type="hidden" name="JobID" value="<%=JobID%>">
 <TABLE BORDER="0" CELLSPACING="2"  CELLPADDING="2" ><center>
	
<TR class="row_title">
	<Td align=center> Login Details<BR></Td>
</TR>
		<TR class=row_odd><TH align="left">Choose User Name
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text class='TextField' name='userid' value='' onchange='fnCallChkAvailability(this)'><A onclick="fnCheckDetails('CheckAvailbility.jsp')"><img border="0"  name="Check" src="Images/Check01.jpg" onmouseover="document['Check'].src='Images/Check1.jpg'" onmouseout="document['Check'].src='Images/Check01.jpg'" ></a>
		<div id='nameid'></div>
		</TD>
		</TR>
		
		<TR class=row_odd><TH align="left">Password
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type='password' name='password' class='TextField' value=''>
		</TR>

		<TR class=row_odd><TH align="left">ReType Password
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type='password' name='retypepassword' class='TextField' value=''>

		</TR>
	
<TR class="row_even">
	<Td align=center><BR><BR></Td>
</TR>

<TR class="row_title">
	<Td align=center>Contact Information<BR></Td>
</TR>
        <TR class=row_odd><TH align="left">First Name
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='FirstName' value=''>
		</TR>

		<TR class=row_odd><TH align="left">Last Name
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='LastName' value=''>
		</TR>

		<TR class=row_odd><TH align="left">Email
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='Email' value=''>
		</TR>

		<TR class=row_odd><TH align="left">Contact Number
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='ContactNumber' value=''>
		</TR>

		<TR class=row_odd><TH align="left">Current Location
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='CurrentLocation' value=''>
		</TR>

		<TR class=row_odd><TH align="left">Address
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<textarea name="Address" class='TextField'></textarea>
		</TR>

	
<TR class="row_even">
	<Td align=center><BR><BR></Td>
</TR>

<TR class="row_title">
	<Td align=center>Personal Information<BR></Td>
</TR>

		<TR class=row_odd>
				<TH align="left">Date Of Birth<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='DateOfBirth' value='' readonly><img onkeypress="fnCalendar(this)" id="imgDate" style="CURSOR: hand" onClick="fnCalendar(this)" height="16" src="Images/CalDis.gif" width="16" border="0" name="imgDate" onMouseOver="fnEnableCalLookup(this)" onMouseOut="fnDisableCalLookup(this)" ></TD>
		</TR>

		<TR class=row_odd>
				<TH align="left">Gender<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<select name=Gender>
				<option value="">--</option>
				<option value=Male>Male</option>
				<option value=Female>Female</option>
				</select></TD>
		</TR>

<TR class="row_even">
	<Td align=center><BR><BR></Td>
</TR>

<TR class="row_title">
	<Td align=center>Educational Information<BR></Td>
</TR>		
		
		<TR class=row_odd>
				<TH align="left">Basic Qualification<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<select name=BasicQualification>
				<option value="">--</option>
				<option value="BA">B.A</option>
				<option value="BArch">B.Arch</option>
				<option value="BCA">BCA</option>
				<option value="BBA">B.B.A</option>
				<option value="BA">B.A</option>
				<option value="BCom">B.Com</option>
				<option value="BEd">B.Ed</option>
				<option value="BDS">BDS</option>
				<option value="BHM">BHM</option>
				<option value="BPharma">B.Pharma</option>
				<option value="BSc">B.Sc</option>
				<option value="BTech">BTech/BE</option>
				<option value="LLB">LLB</option>
				<option value="MBBS">MBBS</option>
				<option value="Diploma">Diploma</option>
				<option value="BVSC">BVSC</option>
				<option value="Other">Other</option>
				</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">Percentage
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='PercentageBQ' value=''size=10>
		</TR>
		
		<TR class=row_odd><TH align="left">Year Of Pass
		<FONT  COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="YearOfPassBQ">
		<option value="">--</option>
		<option value="1950">1950 </option>
		<script>
			for(var i=1950;i<=2020;i++){
				document.writeln("<option value="+i+">"+i+"</option>");
			}
		</script>
		</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">University
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='UniversityBQ' value=''size=10>
		</TR>
                <TR class=row_odd>
				<TH align="left">Post Graduation<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<select name='PostGraduation'>
				<option value="">--</option>
				<option value="CA">CA</option>
				<option value="CS">CS</option>
				<option value="ICWA">ICWA</option>
				<option value="IntegratedPG">IntegratedPG</option>
				<option value="LLM">LLM</option>
				<option value="MA">MA</option>
				<option value="MArch">M.Arch</option>
				<option value="MCom">M.Com</option>
				<option value="MEd">M.Ed</option>
				<option value="MPharma">M.Pharma</option>
				<option value="MSc">M.Sc</option>
				<option value="MTech">M.Tech</option>
				<option value="MBA">MBA/PGDM</option>
				<option value="MCA">MCA</option>
				<option value="PGDiploma">PG Diploma</option>
				<option value="MVSC">MVSC</option>
				<option value="MCM">MCM</option>
				<option value="Other">Other</option>
				</select></TD>
		</TR>
		<TR class=row_odd><TH align="left">Percentage
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='Percentage' value=''size=10>
		</TR>
		
		<TR class=row_odd><TH align="left">Year Of Pass
		<FONT  COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="YearOfPass" value="">
		<option value="">--</option>
		<option value="1950">1950 </option>
		<script>
			for(var i=1950;i<=2020;i++){
				document.writeln("<option value="+i+">"+i+"</option>");
			}
		</script>
		</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">University
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='University' value=''size=10>
		</TR>
		
<TR class="row_even">
	<Td align=center><BR><BR></Td>
</TR>

<TR class="row_title">
	<Td align=center>Professional Information<BR></Td>
</TR>
		<TR class=row_odd><TH align="left">Total Experience
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="Year">
		<option value="">Years</option>
		<option value="0">Fresher</option>
		<script>
			for(var i=1;i<=25;i++){
				document.writeln("<option value="+i+">"+i+"</option>");
			}
		</script>
		</select>
		
		&nbsp;&nbsp;
		<select name="Months">
		<option value="">Months</option>
		<option value="00">00</option>
		<script>
			for(var i=1;i<=11;i++){
				if(i<=9)
					document.writeln("<option value=0"+i+">0"+i+"</option>");
				else{
					document.writeln("<option value="+i+">"+i+"</option>");
				}
			}
		</script>
		</select>
		</TD></TR>

		<TR class=row_odd><TH align="left">Annual Salary
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='AnnualSalary' value=''size=10 onfocus="alert('If You have No Experience Please Provide ZERO In this Field');"> Lakhs
		</TR>

		<TR class=row_odd><TH align="left">Functional Area
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<select name="FunctionalArea">
		<option value="">Select</option>
		<option value="Accounts">Accounts,Finance</option>
		<option value="Banking">Banking,Insurance</option>
		<option value="HR">HR/Administration</option>
		<option value="BPO">ITES/BPO/IPO</option>
		<option value="Marketing">Marketing,Advertising</option>
		<option value="Production">Production,Maintainance</option>
		<option value="Telecom">Telecom</option>
		<option value="IT">Information Technology</option>
		<option value="Application">Application,Programming</option>
		<option value="DBA">DBA,Datawarehousing</option>
		<option value="Mainframe">Mainframe</option>
		<option value="Networking">Network administaration</option>
		<option value="Testing">QA&Testing</option>
		<option value="SystemProgramming">SystemProgramming</option>
		<option value="Medical">Medical/Healthcare</option>
		<option value="InteriorDesign">Architecture,InteriorDesign</option>
		<option value="Media">Media/Entertainment</option>
		</select>
		</TR>
         
		<TR class=row_odd><TH align="left">Company Name
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='CompanyName' value=''size=10 onfocus="alert('If You Are a FRESHER No need to Provide Company Name');">
		</TR>

        <TR class=row_odd><TH align="left">Key Skills
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='KeySkills' value=''size=20><br>
		<FONT COLOR="#B1B1B1">Provide your keyskills seperated by commas <br>Example: C,C++,Java,J2EE...</FONT>
		</TR>

		<TR class=row_odd><TH align="left">ResumeTitle
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type="text" class='TextField' name='ResumeTitle' value=''size=50><br>
		<FONT COLOR="#B1B1B1">Provide a title that describes your work experience.<br>
		Example: Fresher from Andhra University looking for a IT job.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MCA Graduate with 5 years work experience in Testing
		</FONT>
		</TR>
	   <TR class=row_odd><TH align="left">Text Resume
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<textarea name="TextResume" class=TextField  ></textarea>
		<FONT COLOR="#B1B1B1">Copy and paste your resume in the box</FONT>
		</TR>
		<TR class=row_odd><TH align="left">Resume
		<FONT COLOR="red">*</TH>
		<TD class="row_even">&nbsp;&nbsp;<div id="infodiv"></div><Input type="text" name='ResumePath' class= "TextField" readonly><INPUT id="FUBtn" name="FUBtn" class= "UploadButton" TYPE="Button" value='Attach Resume' onclick="fnUpload()" class="UploadButton"><br>
		
		</TR>
        <TR class="row_even">

		<Td align=center>
		<TD class=row_even>&nbsp;&nbsp;<FONT COLOR="#B1B1B1">To Attach your resume: Click 'AttachResume' and find resume in microsoft word format in your computer<br>
		Note: Your resume should be a ".txt" or ".doc" format only.</TD>
		</Td>
		</TR>

	    
        <TR>
		<TH><INPUT TYPE="submit" value='Register' class=Button></TH>
		<TH><INPUT TYPE="reset" value='Clear' class=Button></TH></TR>
		</TABLE>
</FORM>
<%
}else{

%><br><br><br><br><br><h3 align="center"><font color="red">You are not autherised person to register</font></h3>
<%
	}
%>
</BODY>
</HEAD>
</HTML>